From 6ed8b9101dcd22ace86e4862f9a484613ef52a16 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 14 Aug 2002 16:22:07 +0000 Subject: [PATCH] Mapsend files are binary. This matters on dos-based OSes. --- gpsbabel/mapsend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpsbabel/mapsend.c b/gpsbabel/mapsend.c index ac4980553..3e6267b19 100644 --- a/gpsbabel/mapsend.c +++ b/gpsbabel/mapsend.c @@ -50,7 +50,7 @@ test_endianness(void) static void mapsend_rd_init(const char *fname) { - mapsend_file_in = fopen(fname, "r"); + mapsend_file_in = fopen(fname, "rb"); if (mapsend_file_in == NULL) { fprintf(stderr, "Cannot open '%s' for reading\n", fname); exit(1); @@ -166,7 +166,7 @@ my_fwrite4(void *ptr, FILE *stream) static void mapsend_wr_init(const char *fname) { - mapsend_file_out = fopen(fname, "w"); + mapsend_file_out = fopen(fname, "wb"); if (mapsend_file_out == NULL) { fprintf(stderr, "Cannot open '%s' for writing\n", fname); exit(1); -- 2.30.2